<?php
	$db = new Model_mpro;
	$cate = $db->list_cate();
	$cago = $db->list_cago();
	//debug($cago);
?>
<div id="menu_top">
    	<ul class="list_menutop">
      	<li class="li_ac"><a class="active" href="<?php echo base_url ;?>" title="Trang chủ">Trang chủ</a></li>
        <li class="li_ac"><a href="<?php echo base_url."gioi-thieu.html" ;?>" title="Giới thiệu">Giới thiệu</a></li>
        <li><a href="<?php echo base_url."san-pham.html" ;?>" title="Sản phẩm">Sản phẩm</a>
			<ul>
            	<?php
					if(isset($cate) && $cate != NULL){
						foreach($cate as $val){
							//echo "<li><a href='index.php?page=product&act=list_cate&cid=".$val['cate_id']."'>".$val['cate_name']."</a></li>";
							echo "<li><a href='".$val['cate_rewrite']."/c".$val['cate_id'].".html'>".$val['cate_name']."</a></li>";
						}
					}
				?>
			</ul>
		</li>
        <li><a href="<?php echo base_url."tin-tuc.html" ;?>" title="Tin tức">Tin tức</a>
        	<ul>
            	<?php
					if(isset($cago) && $cago != NULL){
						foreach($cago as $val){
							echo "<li><a href='".$val['cago_rewrite']."/ac".$val['cago_id'].".html'>".$val['cago_name']."</a></li>";
						}
					}
				?>
			</ul>
        </li>
        <li><a href="<?php echo base_url."san-pham-khuyen-mai.html" ;?>" title="Khuyến mãi">Khyến mãi</a></li>
        <li><a href="<?php echo base_url."dich-vu-khach-hang/ac208.html" ;?>" title="Dịch vụ khách hàng">Dịch vụ khách hàng</a></li>
        <li><a href="<?php echo base_url."lien-he.html" ;?>" title="Hỗ trợ">Liên hệ</a></li>
      </ul>
      <div id="bg_search">
      	<form action="search" method="post">
        	<div id="search">
          	<input class="txt_search" name="key" placeholder="Từ khóa tìm kiếm ..." />
          </div>
          <div id="submit">
          	<input class="btn_search" type="submit" value="" />
          </div>
        </form>
      </div>
    </div>
    <!--End menu_top-->